package com.example.demo.mapper;

import com.example.demo.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserInfoMapper {
    /*
    根据用户名查询用户信息
     */
    @Select("select * from user where user_name=#{userName}")
    UserInfo queryByName(String userName);

    /*
    根据用户id查询用户信息
     */
    @Select("select * from user where id=#{id}")
    UserInfo queryByID(Integer id);
    @Select("select * from user where id=#{id}")
    UserInfo selectById(Integer userId);
}
